package com.ideaaedi.commonds.tuple;

import lombok.Data;

import java.io.Serializable;

/**
 * 名称 - 值
 *
 * @author <font size = "20" color = "#3CAA3C"><a href="https://gitee.com/JustryDeng">JustryDeng</a></font> <img
 * src="https://gitee.com/JustryDeng/shared-files/raw/master/JustryDeng/avatar.jpg" />
 * @since 2100.8.2
 */
@Data
public class BasicNameValue implements NameValue<String, Serializable> {
    
    /**
     * 名称
     */
    private String name;
    
    /**
     * 值
     */
    private Serializable value;
    
    /**
     * fast create instance
     */
    public static BasicNameValue of(String name, Serializable value) {
        BasicNameValue basicNameValue = new BasicNameValue();
        basicNameValue.setValue(value);
        basicNameValue.setName(name);
        return basicNameValue;
    }
}
